projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9e5682a
)
csv_util: Check for a valid creation time.
author
oliskoli
<oliskoli>
Sun, 7 Sep 2008 16:48:04 +0000
(16:48 +0000)
committer
oliskoli
<oliskoli>
Sun, 7 Sep 2008 16:48:04 +0000
(16:48 +0000)
csv_util.c
patch
|
blob
|
history
diff --git
a/csv_util.c
b/csv_util.c
index 77a50024ca94d874fbb373d08ea3f1d664b7c4f5..e8a55a8cab3fb4b7a41c8dbc49c11d0c0e96e571 100644
(file)
--- a/
csv_util.c
+++ b/
csv_util.c
@@
-779,7
+779,11
@@
yyyymmdd_to_time(const char *s)
tm.tm_mon = t % 100 - 1;
t = t / 100;
tm.tm_year = t - 1900;
- return mktime(&tm);
+
+ if (mkgmtime(&tm) > 0)
+ return mktime(&tm);
+ else
+ return 0;
}